package lj;

import lj.api.Function;
import lj.pojo.Grade;
import lj.pojo.Student;

import java.util.ArrayList;

/**
 * @author lj
 * @Description: 测试类
 * @date 2020-11-23 10:42
 * @QQ 851477108
 */


public class Test {
    public static void main(String[] args){
        ArrayList<Student> students = new ArrayList<>();

        ArrayList<Grade> grades = new ArrayList<>();
        students.add(new Student("小明", "12", 13, grades));
        grades.add(new Grade("高数", 50, 95, 45, 78, 76));
        grades.add(new Grade("语文", 50, 95, 45, 78, 76));
        grades.add(new Grade("英语", 50, 95, 45, 78, 72));
        grades.add(new Grade("计算机", 50, 95, 45, 78, 76));

        ArrayList<Grade> grades1 = new ArrayList<>();
        students.add(new Student("小红", "12", 13, grades1));
        grades1.add(new Grade("高数", 50, 85, 45, 78, 76));
        grades1.add(new Grade("语文", 40, 95, 45, 78, 75));
        grades1.add(new Grade("英语", 50, 95, 45, 78, 76));
        grades1.add(new Grade("计算机", 50, 95, 45, 78, 76));

        ArrayList<Grade> grades2 = new ArrayList<>();
        students.add(new Student("小上", "12", 13, grades2));
        grades2.add(new Grade("高数", 60, 95, 45, 78, 71));
        grades2.add(new Grade("语文", 80, 95, 45, 78, 76));
        grades2.add(new Grade("英语", 50, 95, 45, 78, 76));
        grades2.add(new Grade("计算机", 50, 95, 45, 78, 76));

        ArrayList<Grade> grades3 = new ArrayList<>();
        students.add(new Student("小蓝", "12", 13, grades3));
        grades3.add(new Grade("高数", 20, 95, 45, 78, 76));
        grades3.add(new Grade("语文", 50, 95, 45, 78, 76));
        grades3.add(new Grade("英语", 50, 95, 45, 78, 76));
        grades3.add(new Grade("计算机", 50, 95, 45, 78, 78));

        Function function = new Function(students);
        function.show("小明");
        function.showOneSum("语文");
        function.selectGrade("高数");
    }
}
